/* eslint-disable */
// @ts-ignore
import request from '@/http/vue-query';
import { CustomRequestOptions_ } from '@/http/types';

import * as API from './types';

/** 删除用户数据 根据uuid删除用户数据 DELETE /user/delUser/${param0} */
export function userDelUserUuidUsingDelete({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.UserDelUserUuidUsingDeleteParams;
  options?: CustomRequestOptions_;
}) {
  const { uuid: param0, ...queryParams } = params;

  return request<API.ResultInteger>(`/user/delUser/${param0}`, {
    method: 'DELETE',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 查找用户 根据id查找用户 GET /user/find/${param0} */
export function userFindIdUsingGet({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.UserFindIdUsingGetParams;
  options?: CustomRequestOptions_;
}) {
  const { id: param0, ...queryParams } = params;

  return request<API.ResultUserVO>(`/user/find/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 查找用户 根据用户名或昵称查找用户 GET /user/findByName */
export function userFindByNameUsingGet({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.UserFindByNameUsingGetParams;
  options?: CustomRequestOptions_;
}) {
  return request<API.ResultListUserVO>('/user/findByName', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 根据uuid查找用户 根据uuid查找用户 GET /user/findUser/${param0} */
export function userFindUserUuidUsingGet({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.UserFindUserUuidUsingGetParams;
  options?: CustomRequestOptions_;
}) {
  const { uuid: param0, ...queryParams } = params;

  return request<API.ResultUserVO2>(`/user/findUser/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {}),
  });
}

/** 查找用户信息 根据用户名或昵称查找用户 GET /user/findUserInform */
export function userFindUserInformUsingGet({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.UserFindUserInformUsingGetParams;
  options?: CustomRequestOptions_;
}) {
  return request<API.ResultUser>('/user/findUserInform', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 获取当前用户信息 获取当前用户信息 GET /user/self */
export function userSelfUsingGet({
  options,
}: {
  options?: CustomRequestOptions_;
}) {
  return request<API.ResultUserVO>('/user/self', {
    method: 'GET',
    ...(options || {}),
  });
}

/** 判断用户哪个终端在线 返回在线的用户id的终端集合 GET /user/terminal/online */
export function userTerminalOnlineUsingGet({
  params,
  options,
}: {
  // 叠加生成的Param类型 (非body参数openapi默认没有生成对象)
  params: API.UserTerminalOnlineUsingGetParams;
  options?: CustomRequestOptions_;
}) {
  return request<API.ResultListOnlineTerminalVO>('/user/terminal/online', {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 修改用户信息 修改用户信息，仅允许修改登录用户信息 PUT /user/update */
export function userUpdateUsingPut({
  body,
  options,
}: {
  body: API.UserVO;
  options?: CustomRequestOptions_;
}) {
  return request<API.Result>('/user/update', {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
